var trip = {
    vueInfo:null,
    URL: {
        getUserInfoUrl: "/api/userInfo/getUserInfo",
    },
    detail: {
        init: function () {
            $.post(trip.URL.getUserInfoUrl, {}, function (data) {
                if (!data.hasError) {
                    trip.vueInfo = new Vue({
                        el: "#all",
                        data: {
                            userInfo: data.object,
                        },
                        mounted: function () {
                            var vmObj = this;
                            if (vmObj.userInfo.regFlag==0){
                                window.location.href="info.html";
                                return false;
                            }
                            if (__JsUtil.isNullOrEmpty(vmObj.userInfo.forumNum)){
                                window.location.href="forum.html";
                                return false;
                            }
                            winInit();
                            $.pop.load(false, null);
                        },
                        filters:{
                            forumNumStr:function (value) {
                                if (value == 1){
                                    return "中国智造，领航全球";
                                }else if (value == 2){
                                    return "电商新视界";
                                }else if (value == 3){
                                    return "玩转采购节";
                                }else {
                                    return "";
                                }
                            }
                        }
                    });
                } else {
                    $.pop.tips(data.error);
                    if (data.errType != null) {
                        if (data.errType == "NOSESSION") {
                            setTimeout(function () {
                                window.location.href = data.errUrl;
                                return false;
                            }, 400);
                        }
                    }
                }
            }, "json").error(function (XMLHttpRequest, textStatus, errorThrown) {
                $.pop.load(false, null);
                $.pop.tips("系统繁忙，请稍后" + XMLHttpRequest.status + "," + XMLHttpRequest.readyState + "," + textStatus);
            });
        },
    }
}